1. Field of the Invention
The present invention relates to a system, method, program, and data structures for mapping logical blocks to physical blocks by defining logical chunks and physical chunks in the logical and physical storage spaces, respectively.
2. Description of the Related Art
An operating system arranges the storage space of a storage system into logical volumes. A hierarchy of structures is used to manage fixed-disk storage. In large mainframe systems, such as the International Business Machines Corporation (IBM) AIX ad, or OS/390 operating systems, each individual fixed-disk drive is referred to as a physical volume (PV). Every physical volume in use belongs to a volume group (VG). All of the physical volumes in a volume group may be divided into physical partitions (PPs) of the same size. Within each volume group, one or more logical volumes (LVs) are defined. Logical volumes are groups of information located on physical volumes. Data on logical volumes appears to be contiguous to the user but can be discontiguous on the physical volume. This allows file systems, paging space, and other logical volumes to be resized or relocated, span multiple physical volumes, and have their contents replicated for greater flexibility and availability in the storage of data. The logical volume is the host system view of the storage space and defines allocation of disk space down to the physical-partition level.
The set of operating system commands, library subroutines, and other tools that allow system administrators to establish and control logical volume storage is sometimes refereed to as a Logical Volume Manager (LVM). The Logical Volume Manager (LVM) controls disk resources by providing the mapping of data between a more simple and flexible logical view of storage space and the actual physical disks. The Logical Volume Manager (LVM) consists of the logical volume device driver (LVDD) and the LVM subroutine interface library. The logical volume device driver (LVDD) is a pseudo-device driver that manages and processes all I/O. It translates logical addresses into physical addresses and sends I/O requests to specific device drivers. The LVM subroutine interface library contains routines that are used by the system management commands to perform system management tasks for the logical and physical volumes of a system.
The host views the storage device as Logical Unit Numbers or LUNs. A storage controller defines a mapping from the LUN space to physical storage. In the prior art, the Logical Volume Manager is capable of subdividing the LUN into logical chunks and then associating contiguous or noncontiguous logical chunks in the LUN storage space with logical volumes. In this way, the Logical Volume Manager may expand the size of a logical volume by assigning an additional logical chunk to the logical volume. One drawback of this approach is that the Logical Volume Managers on different host systems must coordinate their activity to ensure that they all maintain the same assignment of logical chunks of the LUN to the logical volumes.
Data in a logical volume may be stored in an array of disk drives referred to as a Redundant Array of Independent Disks (RAID). A RAID array of disks are managed by a RAID controller as a single physical volume. The RAID controller writes data from a logical volume across multiple disk drives. In a RAID 5 geometry, one of the disk drives is used to maintain parity information so that if one disk drive fails, the data can be reconstructed from the parity information and data on the surviving disk drives. In RAID implementations, data from a logical volume is striped or written across several disk drives in such a way that the I/O capacity of the disk drives can be used in parallel to access data on the logical volume. Data from a logical volume is written (striped) across consecutive blocks on the disks. A complete stripe consists of one stripe unit on each of the physical devices that contains part of the striped logical volume. The Logical Volume Manager determines which physical blocks on which physical drives correspond to a block being read or written. If more than one drive is involved, the necessary I/O operations are scheduled for all drives simultaneously.
In prior art systems, a volume may be deleted from a storage system. To reuse the data in the storage system, the systems administrator would have to allocate the physical space previously used for the deleted volume to another volume that is capable of fitting into the space. Thus, the systems administrator is limited to the size of the freed-up space in attempting to reuse that space for another logical volume. Further, in prior host systems that do not include the Logical Volume Manager, there is no way to dynamically increase the size of a volume that is currently in use. In current art, to add space when there is no Logical Volume Manager, a new logical volume must be added to the system. Still further, in the current art, a logical volume does not span multiple RAID arrays.
Thus, there is a need in the art for an improved method, system, program, and data structures for allocating physical storage space to logical volumes.